package com.util;

import com.example.santiagotur.R;

import android.app.AlertDialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;


public class AlertDialogHelper {
	 public static AlertDialog setProgressDialog(AlertDialog progress, String message, Context context) {

	        LayoutInflater infl = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	        //
	        View v = infl.inflate(R.layout.dialog_loading, null);
	        //
	        TextView mess = (TextView) v.findViewById(R.id.text_dialog_loading);
	        
	        mess.setText(message);
	        //
	        AlertDialog.Builder dl = new AlertDialog.Builder(context);
	        dl.setView(v);
	        dl.setCancelable(false);
	        //
	        progress = dl.create();
	        //

	        return progress;
	    }
}
